Multiprotocol label switching (MPLS) provides a technique for routing packet data based on a label field rather than a destination address. An MPLS network comprises a set of nodes, which are called label switched routers (LSRs), that switch/route packets based on a label that has been added to each packet. Labels are used to define a flow of packets between two nodes or, if packets are being broadcast in a multicast operation, between a source node and multiple destination nodes. A specific path through the LSRs called a label switched path (LSP) is defined for each distinct flow, which is called a forwarding equivalence class (FEC). At intervening nodes in an LSP, an LSR may route the packet based on the MPLS label value, remove the MPLS label (pop a label), and/or impose an additional label (push a label). The label may be removed at the node from the packet at a node that is just prior to the destination node in a particular LSP. This process is sometimes referred to as “penultimate hop popping.”
Referring now to FIG. 1, an exemplary MPLS label and Internet Protocol (IP) packet are illustrated. The MPLS label is a 32-bit header that includes a 20-bit label field, a 3-bit Exp field that is reserved for experimental use, a 1-bit S field that is set to one for the oldest entry in the stack and zero for all other entries, and an 8-bit time-to-live (TTL) field that may be used to encode a hop count or time-to-live value. An MPLS label may also be referred to as an MPLS shim header. As shown in FIG. 1, multiple MPLS labels or shim headers may be included in a single IP packet. The MPLS labels or shim headers are organized as a last-in, first-out stack and are processed based on the top MPLS label or shim header. As discussed above, an LSR may add an MPLS label or shim header to the stack (push operation) or remove an MPLS label or shim header from the stack (pop operation).
In IP networks, packets are routed according to their address. Routers typically do a pattern match of a packet's destination address with a set of known address ranges in a route table. The table entry tells the router which way to send the packet. Traditionally, IP addresses have a layer of indirection through the domain name system (DNS). A DNS is used to translate between domain names and IP addresses. Moreover, various algorithms have evolved to create relationships between domain names and IP addresses.
MPLS networks map IP address destinations to MPLS labels, which then determine the path and destination within the MPLS network that the IP packet will take. Unlike IP addresses, MPLS labels may not have global significance and an IP destination may be represented with different labels in different MPLS networks or even in different locations within the same MPLS network.